home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 32
/
Amiga Format AFCD32 (Nov 1998, Issue 117).iso
/
-seriously_amiga-
/
emulation
/
emunet09b
/
install_for_amitcp
< prev
Wrap
Text File
|
1998-08-10
|
4KB
|
149 lines
.k CPU,NOADD
.bra {
.ket }
;--------------------------------------------------------
; Simple install script for EmuNet SANA-2 Device driver
; Assign AmiTCP: pointing to right place before running this!
; If you should run this again use NOADD switch to
; prevent installing device entry multiple times.
;--------------------------------------------------------
if "$INSTEMUNET" not eq "GIVEUSAGE"
setenv INSTEMUNET GIVEUSAGE
echo ""
echo ""
echo "First run hint.. restart after reading the usage info."
echo ""
echo ""
skip usage
endif
if "{CPU}" eq "?"
skip usage
endif
assign >NIL: AmiTCP: exists
if warn
echo "Please assign AmiTCP: first before running this."
skip usage
endif
if "{CPU}" eq ""
setenv EMNDEVNAME emunet.device_020
else
if "{CPU}" eq "000"
setenv EMNDEVNAME emunet.device
else
if "{CPU}" eq "020"
setenv EMNDEVNAME emunet.device_020
else
echo "Give CPU name as 000 or 020"
skip finish
endif
endif
endif
;--------------------------------------------------------
; Check for necessary files
;--------------------------------------------------------
if "{NOADD}" not eq ""
skip noadds1
endif
if not exists db/interfaces_ADD
echo "Can't find db/interfaces_ADD"
skip usage
endif
lab noadds1
if not exists bin/EMN_StartNet
echo "Can't find bin/EMN_Startnet script"
skip usage
endif
if not exists env/sana2/emunet.config
echo "Can't find emunet.config file"
quit 11
endif
if "{NOADD}" not eq ""
skip noadds2
endif
if exists AmiTCP:db/interfaces
echo "Adding emn0 device to AmiTCP:db/interfaces"
type db/interfaces_ADD >>AmiTCP:db/interfaces
echo "Done."
endif
lab noadds2
;--------------------------------------------------------
if not exists devs/networks/$EMNDEVNAME
echo "Can't find devs/networks/$EMNDEVNAME"
skip usage
endif
if exists DEVS:Networks/emunet.device
echo "Renaming old emunet.device as DEVS:Networks/emunet.device.OLD"
copy DEVS:Networks/emunet.device DEVS:Networks/emunet.device.OLD CLONE
protect DEVS:Networks/emunet.device +rwed
echo "Done."
endif
echo "Installing $EMNDEVNAME driver to DEVS:Networks/emunet.device"
copy devs/networks/$EMNDEVNAME DEVS:Networks/emunet.device CLONE
;--------------------------------------------------------
; Create backups of existing files
;--------------------------------------------------------
if exists AmiTCP:bin/EMN_StartNet
echo "Renaming old startup script to EMN_StartNet.OLD"
copy AmiTCP:bin/EMN_StartNet AmiTCP:bin/EMN_StartNet.OLD CLONE
protect AmiTCP:bin/EMN_StartNet +rwed
echo "Done."
endif
if exists ENVARC:sana2/emunet.config
echo "Renaming old config file to ENVARC:sana2/emunet.config.OLD"
copy ENVARC:sana2/emunet.config ENVARC:sana2/emunet.config.OLD CLONE
echo "Done"
protect ENVARC:sana2/emunet.config +rwed
endif
if exists ENV:sana2/emunet.config
copy ENV:sana2/emunet.config ENV:sana2/emunet.config.OLD CLONE
failat 21
;* HappyEnv handler seems to be not supporting file protection flags
; so do not fail for this small error if the user has this installed.
protect >NIL: ENV:sana2/emunet.config +rwed
failat 20
delete >NIL: ENV:sana2/emunet.config
endif
;--------------------------------------------------------
; Install sample config & startnet scripts
;--------------------------------------------------------
echo "Installing sample configuration file emunet.config to ENVARC:sana2/ & ENV:sana2/"
copy env/sana2/emunet.config ENVARC:sana2/ CLONE
copy env/sana2/emunet.config ENV:sana2/ CLONE
echo "Done."
echo "Installing example startup script EMN_StartNet to AmiTCP:bin/"
copy bin/EMN_StartNet AmiTCP:bin/ CLONE
protect AmiTCP:bin/EMN_StartNet +s
echo "Done."
;--------------------------------------------------------
; Whell some advice is always necessary :)
;--------------------------------------------------------
echo ""
echo ""
echo "Please read documentation to learn how to install the PC driver"
echo ""
echo ""
unsetenv INSTEMUNET
skip finish
lab usage
echo "This script has to be run from the directory,"
echo "where you extracted the archive!"
echo ""
echo "Please assign AmiTCP: first before running this."
echo "Supply your CPU type, as this script defaults to 68020"
echo "Usage: install_for_amitcp [000|020] [NOADD] [NODEV] "
lab finish